# $Id: PKGBUILD 61604 2012-01-04 18:44:15Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Angelo Theodorou <encelo@users.sourceforge.net>
# Contributor: Lex Rivera aka x-demon <aur@x-demon.org>                
# Contributor: Gianluca Sforna <giallu@fedoraproject.org>
pkgname=alleyoop
pkgver=0.9.8
pkgrel=2
pkgdesc="Valgrind front-end for the GNOME environment"
arch=('x86_64' 'i686')
url="http://alleyoop.sourceforge.net/"
license=('GPL2')
depends=('valgrind' 'libgnomeui' 'hicolor-icon-theme')
makedepends=('intltool')
install=alleyoop.install
source=("http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz"
        "http://www.roboticoverlords.org/$pkgname/${pkgname}16.png"
        "http://www.roboticoverlords.org/$pkgname/${pkgname}32.png"
        "http://www.roboticoverlords.org/$pkgname/${pkgname}64.png"
        "http://www.roboticoverlords.org/$pkgname/${pkgname}128.png"
        "http://www.roboticoverlords.org/$pkgname/${pkgname}256.png"
        "$pkgname.desktop")
sha256sums=('0b36fd3af83aa74d363a5d13414b7a38c3efabd2fce0fbeb2a8171998e0b6756'
            '470287270aafada00fc1be9e47713a62b44836fca677a0a2ea29f2bcbd46926f'
            '9f461fa169ee7fd43a1d58bc0c4afe4f807437b7d585ac4445390dac7590f4af'
            '9e33d888ef45ae520ce8610507af6a7867e3c3cfe99beab2040a7d42e44dc1e0'
            'c32c5a900f4521599c497f15e8f3edb7125ebcc7571ceaa2f9ebfe45fa2dfe27'
            '15f4fb65a102cefd9e80cdb7a7cf8ab6be02e1d773a75536396076c1136875bd'
            'b2b2d6fde890bb237c34874ebf27c33f1839d217d2893d6f8d05d949dab68e7b')

build() {
  cd "$srcdir/$pkgname-$pkgver"

  msg2 "Configuring..."
  ./configure --prefix=/usr --sysconfdir=/etc

  msg2 "Compiling..."
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  msg "Packaging files..."
  make DESTDIR="$pkgdir" install

  msg "Packaging icons..."
  for dim in 16 32 64 128 256; do
    install -Dm644 "../${pkgname}${dim}.png" \
      "$pkgdir/usr/share/icons/hicolor/${dim}x$dim/apps/$pkgname.png"
  done  

  msg2 "Packaging desktop shortcut..."
  install -Dm644 "../$pkgname.desktop" \
    "$pkgdir/usr/share/applications/$pkgname.desktop"

  msg2 "Packaging license..."
  install -Dm644 COPYING \
    "$pkgdir/usr/share/licenses/$pkgname/COPYING"

  msg2 "Cleaning up..."
  rm -r "$pkgdir/etc"
}

# vim:set ts=2 sw=2 et:
